<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<div class="righttitle"><span>发票查询-正常发票查询</span></div>
<div class="tabitem">
    <div class="tabitemform">
<!--    	<span>查询条件</span>-->
        <div>
        	<ul>
            	<li><label for="fpdm">发票代码：</label><input type="text" id="fpdm" name="fpdm" value="" maxlength="12"/></li>
                <li><label for="fphm">发票号码：</label><input type="text" id="fphm" name="fphm" value="" maxlength="8"/></li>
                <li><label for="skdw">收款单位：</label><input type="text" id="skdw" name="skdw" value="" maxlength="70"/></li>
            </ul>
            <ul>
            	<li><label for="khbh">客户编号：</label><input type="text" id="khbh" name="khbh" value="" maxlength="12"/></li>
            	<li><label for="kprq">开票日期：</label><input type="text" id="kprq" name="kprq" value="" maxlength="12"/></li>
                <li><label for="sky">收款员：</label><input type="text" id="sky" name="sky" value="" maxlength="8"/></li>
            </ul>
            <ul>
            	<li><input type="button" name="submit" value="提交" /></li>
                <li><input type="button" name="clear" value="重置"/></li>
            </ul>
            
        </div>
    </div>
</div>
<div class="tabitem">
    <div class="itemresultarea" style="width:790px;">
<!--    	<div ><span>查询结果</span></div>-->
    	<div class="itemresult greenbg">
        	<ul>
            	<li style="width:90px;">发票代码</li>
                <li style="width:60px;">发票号码</li>
                <li style="width:80px;">客户编号</li>
                <li style="width:310px;">收款单位</li>
                <li style="width:70px;">开票日期</li>
                <li style="width:70px;">金额</li>
                <li style="width:30px;">操作</li>
            </ul>
        </div>
        <div id="itemresult" class="itemresult"></div>
        <div class="clearboth"></div>
        <div id="pagetable"></div>
    </div>
</div>
<script type="text/javascript">
	$(function(){
		$.getJSON("SearchAction!search.action",
					{currpage:1,searchitem:"{'fpdm':'"+$("#fpdm").val()+"','fphm':'"+$("#fphm").val()+"'}"},
					function(json){
						if(json.totaldata!=0){
							var s="";
							for(var i=0;i<json.data.length;i++){
								s+='<ul>'+
										'<li style="width:90px;">'+json.data[i].fpdm+'</li>'+
										'<li style="width:60px;">'+json.data[i].fphm+'</li>'+
										'<li style="width:90px;">'+json.data[i].khbh+'</li>'+
										'<li style="width:300px;">'+json.data[i].skdw+'</li>'+
										'<li style="width:70px;">'+json.data[i].kprq+'</li>'+
										'<li style="width:70px;">'+json.data[i].je+'</li>'+
										'<li style="width:30px;"><a href="javascript:void(0);" onclick="alert(\'ok\');">详情</a></li>'+
									'</ul>'+'<div class="greenline"></div>';
							}
							$("#itemresult").html(s);
							
							$("#pagetable").myPagination({
							  currPage: 1,
							  pageCount: json.totalpage,
							  pageSize: 10,
							  cssStyle:'scott'
							});	
						}
					});
		
	});


</script>